package wbhproject.servlets;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;
import wbhproject.tools.MeasurePointRequestorController;

public class TestServletContextListener implements ServletContextListener {
	static Logger log = Logger.getLogger(TestServletContextListener.class);
	

	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		System.out.println(this.getClass().getName()
				+ ".contextDestroyed was called");
		log.info(this.getClass().getName() + ".contextDestroyed was called");
	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		System.out.println(this.getClass().getName()
				+ ".contextInitialized was called");
		log.info(this.getClass().getName() + ".contextInitialized was called");
		MeasurePointRequestorController measurePointRequestorController = MeasurePointRequestorController
				.getInstance();
		log.debug("MeasurePointRequestorController initiated at "
				+ String.valueOf(measurePointRequestorController.getBirthDate()));
	}

}
